<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0" />
        <link rel="icon" href="favicon.ico" />
        <link
            rel="shortcut icon"
            id="avatar"
            href="./static/images/logo.png"
            type="image/x-icon"
        />
        <link
            rel="stylesheet"
            href="//at.alicdn.com/t/c/font_4379922_vq353d39np9.css"
        />
        <title id="pageTitle">怎妄想万众瞩目</title>
    </head>

    <body>
        <div id="app"></div>
    </body>
    <!-- 看板娘 -->
    <script
        type="text/javascript"
        src="./static/live2dw/lib/L2Dwidget.min.js"
    ></script>
    <script>
        document.addEventListener("visibilitychange", function () {
            var pageTitle = document.getElementById("pageTitle");

            if (document.hidden) {
                // 页面失去焦点时更改标题文字
                pageTitle.innerText = "(´Д｀)大変だ！";
            } else {
                // 页面获得焦点时更改标题文字
                pageTitle.innerText = "怎妄想万众瞩目";
            }
        });
        document.addEventListener("visibilitychange", function () {
            var avatar = document.getElementById("avatar");

            if (document.hidden) {
                // 页面失去焦点时更改头像
                avatar.src = "./static/images/logo.png";
            } else {
                // 页面获得焦点时更改头像
                avatar.src = "./static/images/logo.png";
            }
        });
    </script>
</html>
